package com.christina.service.domain.chat.model;

import lombok.Data;
import lombok.Builder;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 聊天响应模型
 * 
 * @author Christina
 */
@Data
@Builder
public class ChatResponse {
    
    /**
     * 响应内容
     */
    private String content;
    
    /**
     * 响应消息
     */
    private String response;
    
    /**
     * 对话ID
     */
    private String conversationId;
    
    /**
     * 消息ID
     */
    private String messageId;
    
    /**
     * 时间戳
     */
    private LocalDateTime timestamp;
    
    /**
     * 响应类型
     */
    private ResponseType responseType;
    
    /**
     * 建议操作
     */
    private List<SuggestedAction> suggestedActions;
    
    /**
     * 情感分析结果
     */
    private SentimentAnalysis sentiment;
    
    /**
     * 响应时间
     */
    private LocalDateTime responseTime;
    
    /**
     * 响应类型
     */
    public enum ResponseType {
        ANSWER("直接回答"),
        SUGGESTION("建议"),
        QUESTION("反问"),
        ACTION("操作指令");
        
        private final String description;
        
        ResponseType(String description) {
            this.description = description;
        }
        
        public String getDescription() {
            return description;
        }
    }
    
    /**
     * 建议操作
     */
    @Data
    @Builder
    public static class SuggestedAction {
        private String actionId;
        private String actionText;
        private String actionType;
        private Object actionData;
    }
    
    /**
     * 情感分析
     */
    @Data
    @Builder
    public static class SentimentAnalysis {
        private String sentiment; // positive, negative, neutral
        private Double confidence;
        private String emotion; // happy, sad, angry, etc.
    }
}